﻿@model MobileDesigner.Models.AdminEditUserModel

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>AdminEditUserModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Phone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Phone)
            @Html.ValidationMessageFor(model => model.Phone)
        </div>

         <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserGroup)
        </div>
        <div class="editor-dropDownList">
            @Html.DropDownListFor(model => model.UserGroup, new SelectList(Roles.GetAllRoles()))
            @Html.ValidationMessageFor(model => model.UserGroup)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SuperiorID)
        </div>
        <div class="editor-dropDownList">
            @Html.DropDownListFor(model => model.SuperiorID, (SelectList)ViewBag.Managers)
        </div>

        @Html.HiddenFor(model => model.UserId)
        <p>
            <input type="submit" value="Сохранить" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Назад к списку учетных записей", "Accounts")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
